<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <?php include_http_metas() ?>
    <?php include_metas() ?>
    <?php include_title() ?>
    <link rel="shortcut icon" href="/favicon.ico" />
	<?php include_partial('global/jsI18N');?>
    
    <link href="http://fonts.googleapis.com/css?family=Headland+One%7COpen+Sans:400,300&amp;subset=latin,cyrillic" rel="stylesheet" type="text/css"></link>
    <?php include_stylesheets() ?>
    <?php include_javascripts() ?>
    
  </head>
  <body>
    <?php if ($sf_user->hasFlash('notice')): ?>
      <div class="flash_notice">
        <?php echo $sf_user->getFlash('notice') ?>
      </div>
    <?php endif; ?>
    <?php if ($sf_user->hasFlash('error')): ?>
      <div class="flash_error">
        <?php echo $sf_user->getFlash('error') ?>
      </div>
    <?php endif; ?>
    <div id="main">
      <?php echo $sf_content ?>
    </div>
    <?php 
    if(!(sfContext::getInstance()->getModuleName()=='hometouch' && sfContext::getInstance()->getActionName()=='index' )): ?>
    <script>
    	$(document).ready(function () {

    	    //Deals with Idle session
    	    var timeout = <?php echo sfConfig::get("app_timeout", 20)*1000 ?>;

    	     $(document).bind("idle.idleTimer", function () {
    	         $(location).attr('href', '<?php echo url_for('@logoutTouch') ?>');
    	     });

    	     $.idleTimer(timeout);
    	});
    </script>
    <?php endif; ?>
    
  </body>
</html>
